<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pymunk.Body</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar">
  <tr valign="middle">
  <!-- Project homepage -->
      <!--<th class="navbar" 
            ><a class="navbar" target="_top" href="http://pymunk.googlecode.com/">pymunk API reference</a></th>-->

  <!-- Tree link -->
      <th><a
        href="module-tree.html">Trees</a></th>

  <!-- Index link -->
      <th><a
        href="identifier-index.html">Indices</a></th>

  <!-- Breadcrumbs -->
      <th class="navbar-breadcrumbs">
        <span class="breadcrumbs">
          <a href="pymunk-module.html">pymunk</a>&nbsp;.&nbsp;Body
        </span>
      </th>

      <th class="navbar last">
        <a href="javascript:toggleFrames()">Toggle&nbsp;frames</a>
      </th>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class pymunk.Body</h1>
<!-- ==================== METHODS ==================== -->
<a name="section-Methods"></a>
        <h2>Methods</h2>
<table class="summary">
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mass</span>,
        <span class="summary-sig-arg">inertia</span>)</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a name="__del__"></a><span class="summary-sig-name">__del__</span>(<span class="summary-sig-arg">self</span>)</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a href="pymunk.Body-class.html#apply_impulse" class="summary-sig-name">apply_impulse</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">j</span>,
        <span class="summary-sig-arg">r</span>)</span>
<div class="summary-description">Apply the impulse j to body with offset r.</div>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a name="reset_forces"></a><span class="summary-sig-name">reset_forces</span>(<span class="summary-sig-arg">self</span>)</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a href="pymunk.Body-class.html#apply_force" class="summary-sig-name">apply_force</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">f</span>,
        <span class="summary-sig-arg">r</span>)</span>
<div class="summary-description">Apply (accumulate) the force f on body with offset r.</div>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a href="pymunk.Body-class.html#update_velocity" class="summary-sig-name">update_velocity</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">gravity</span>,
        <span class="summary-sig-arg">damping</span>,
        <span class="summary-sig-arg">dt</span>)</span>
<div class="summary-description">Updates the velocity of the body using Euler integration.</div>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a href="pymunk.Body-class.html#update_position" class="summary-sig-name">update_position</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span>
<div class="summary-description">Updates the position of the body using Euler integration.</div>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a name="local_to_world"></a><span class="summary-sig-name">local_to_world</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">v</span>)</span>
<div class="summary-description">Convert body local to world coordinates</div>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a name="world_to_local"></a><span class="summary-sig-name">world_to_local</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">v</span>)</span>
<div class="summary-description">Convert world to body local coordinates</div>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <span class="summary-sig"><a href="pymunk.Body-class.html#damped_spring" class="summary-sig-name">damped_spring</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">b</span>,
        <span class="summary-sig-arg">anchor1</span>,
        <span class="summary-sig-arg">anchor2</span>,
        <span class="summary-sig-arg">rlen</span>,
        <span class="summary-sig-arg">k</span>,
        <span class="summary-sig-arg">dmp</span>,
        <span class="summary-sig-arg">dt</span>)</span>
<div class="summary-description">Apply a spring force between this and body b at anchors anchr1 and anchr2
respectively.</div>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
        <h2>Properties</h2>
<table class="summary">
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Body-class.html#mass" class="summary-name">mass</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Body-class.html#moment" class="summary-name">moment</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Body-class.html#angle" class="summary-name">angle</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Body-class.html#rotation_vector" class="summary-name">rotation_vector</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Body-class.html#torque" class="summary-name">torque</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Body-class.html#position" class="summary-name">position</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Body-class.html#velocity" class="summary-name">velocity</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Body-class.html#angular_velocity" class="summary-name">angular_velocity</a>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
        <h2>Method Details</h2>
<table class="details">
</table>
<a name="apply_impulse"></a>
<div class=" detail">
  <h3>apply_impulse</h3>
  <div class="detail-signature">
    <span class="sig"><span class="sig-name">apply_impulse</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">j</span>,
        <span class="sig-arg">r</span>)</span>
    </div>
  <div class="detail-description">
  Apply the impulse j to body with offset r. Both j and r should be in
world coordinates.
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="apply_force"></a>
<div class=" detail">
  <h3>apply_force</h3>
  <div class="detail-signature">
    <span class="sig"><span class="sig-name">apply_force</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">f</span>,
        <span class="sig-arg">r</span>)</span>
    </div>
  <div class="detail-description">
  Apply (accumulate) the force f on body with offset r. Both f and r
should be in world coordinates.
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="update_velocity"></a>
<div class=" detail">
  <h3>update_velocity</h3>
  <div class="detail-signature">
    <span class="sig"><span class="sig-name">update_velocity</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">gravity</span>,
        <span class="sig-arg">damping</span>,
        <span class="sig-arg">dt</span>)</span>
    </div>
  <div class="detail-description">
  Updates the velocity of the body using Euler integration. You don't
need to call this unless you are managing the object manually instead
of adding it to a Space.
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="update_position"></a>
<div class=" detail">
  <h3>update_position</h3>
  <div class="detail-signature">
    <span class="sig"><span class="sig-name">update_position</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dt</span>)</span>
    </div>
  <div class="detail-description">
  Updates the position of the body using Euler integration. Like
updateVelocity() you shouldn't normally need to call this yourself.
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="damped_spring"></a>
<div class=" detail">
  <h3>damped_spring</h3>
  <div class="detail-signature">
    <span class="sig"><span class="sig-name">damped_spring</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">b</span>,
        <span class="sig-arg">anchor1</span>,
        <span class="sig-arg">anchor2</span>,
        <span class="sig-arg">rlen</span>,
        <span class="sig-arg">k</span>,
        <span class="sig-arg">dmp</span>,
        <span class="sig-arg">dt</span>)</span>
    </div>
  <div class="detail-description">
  Apply a spring force between this and body b at anchors anchr1 and anchr2
respectively. k is the spring constant (force/distance), rlen is the rest
length of the spring, dmp is the damping constant (force/velocity), and dt
is the time step to apply the force over.
  <dl class="fields">
  </dl>
  </div>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
        <h2>Property Details</h2>
<table class="details">
</table>
<a name="mass"></a>
<div class=" detail">
  <h3>mass</h3>
  <div class="detail-description">
  
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="moment"></a>
<div class=" detail">
  <h3>moment</h3>
  <div class="detail-description">
  
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="angle"></a>
<div class=" detail">
  <h3>angle</h3>
  <div class="detail-description">
  
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="rotation_vector"></a>
<div class=" detail">
  <h3>rotation_vector</h3>
  <div class="detail-description">
  
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="torque"></a>
<div class=" detail">
  <h3>torque</h3>
  <div class="detail-description">
  
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="position"></a>
<div class=" detail">
  <h3>position</h3>
  <div class="detail-description">
  
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="velocity"></a>
<div class=" detail">
  <h3>velocity</h3>
  <div class="detail-description">
  
  <dl class="fields">
  </dl>
  </div>
</div>
<a name="angular_velocity"></a>
<div class=" detail">
  <h3>angular_velocity</h3>
  <div class="detail-description">
  
  <dl class="fields">
  </dl>
  </div>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar">
  <tr valign="middle">
  <!-- Project homepage -->
      <!--<th class="navbar" 
            ><a class="navbar" target="_top" href="http://pymunk.googlecode.com/">pymunk API reference</a></th>-->

  <!-- Tree link -->
      <th><a
        href="module-tree.html">Trees</a></th>

  <!-- Index link -->
      <th><a
        href="identifier-index.html">Indices</a></th>

  <!-- Breadcrumbs -->
      <th class="navbar-breadcrumbs">
        <span class="breadcrumbs">
          <a href="pymunk-module.html">pymunk</a>&nbsp;.&nbsp;Body
        </span>
      </th>

      <th class="navbar last">
        <a href="javascript:toggleFrames()">Toggle&nbsp;frames</a>
      </th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Wed Apr 30 17:58:44 2008
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
